<?php

/*
 * 新锐手机注册 [ 深圳市新锐创意科技有限公司旗下产品 ]
 * Copyright  2015-2099 www.xinruiweb.com  All Rights Reserved.
 * 技术开发: 75674952@qq.com
 * 请支持正版授权产品
 */

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

class table_xinrui_mobilereg_outhcode extends discuz_table {

	public function __construct() {
		$this->_table = 'xinrui_mobilereg_outhcode';
		$this->_pk = 'id';

		parent::__construct();
	}


    public function fetch_by_code_status($code,$mobile) {
		return DB::fetch_first('SELECT * FROM %t WHERE code=%d and mobile=%s and status = 0 and expiredtime > %s order by id desc limit 1', array($this->_table, $code,$mobile,time()));
	}

}
